﻿using System.Reflection;

namespace Ooaavee.Data.Model
{
    /// <summary>
    /// An interface for searching tables.
    /// </summary>
    public interface ITableFinder
    {
        /// <summary>
        /// Searches for the table with the specified name.
        /// </summary>
        /// <param name="name">The String containing the name of the table to get.</param>
        /// <returns>A Table object with the specified name, if found; otherwise a null.</returns>
        /// <exception cref="AmbiguousMatchException">More than one table is found with the specified name.</exception>
        Table this[string name] { get; }

        /// <summary>
        /// Searches for the table with the specified name.
        /// </summary>
        /// <param name="name">The String containing the name of the table to get.</param>
        /// <returns>A Table object with the specified name, if found; otherwise a null.</returns>
        /// <exception cref="AmbiguousMatchException">More than one table is found with the specified name.</exception>
        Table Find(string name);
    }
}
